﻿using Orchard;
using Orchard.Localization;
using Orchard.UI.Navigation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MultiChoiceVoting
{
    public class AdminMenu : Component, INavigationProvider
    {
        public Localizer T { get; set; }

        public AdminMenu()
        {
            T = NullLocalizer.Instance;
        }

        public string MenuName { get { return "admin"; } }


        public void GetNavigation(NavigationBuilder builder)
        {
            builder.AddImageSet("multichoicevoting")
              .Add(T("Multi-Choice Votings"), "7",
                          menu => menu.Add(T("Multi-Choice Votings"), "0", item => item.Action("Index", "Admin", new { area = "MultiChoiceVoting" })
                                                                                .Permission(Permissions.ManageMultiChoiceVoting)));
        }
    }
}